<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:replace="layout-admin">
<head>
    <meta charset="UTF-8">


    <th:block th:fragment="header">
        <style>
        </style>
    </th:block>

</head>
<body>

<div class="container-md" id="container" th:fragment="content">

</div>

<th:block th:fragment="footer">

    <script>

        function loadData(){
            console.log("load")
            axios.get('/qrcode', {}).then(function (response) {
                console.log("response",response)
                obj.next();
            }).catch(function (error) {
                console.log("error",error);
            });
        }
        function* test(){
            console.log("before loadData");
            yield loadData();
            console.log("after loadData");
        }

        var obj = test();
        obj.next();
        //obj.next();

    </script>

</th:block>
</body>
</html>